package com.wb.iec104.run;

import com.wb.iec104.analysis.AnalysisIEC104;
import com.wb.tcp.common.utils.ConstUtils;
import lombok.extern.slf4j.Slf4j;

/**
 * @author cy
 */
@Slf4j
public class RunAnalysis extends Thread{
    @Override
    public void run() {
        log.info("启动解析程序");
        AnalysisIEC104 analysisIEC104=new AnalysisIEC104();
        for(;;){
            try {
                String message = ConstUtils.HEX_QUEUE.take();
                analysisIEC104.analysis(message);
            }catch (Exception e){
                log.error("发生错误", e);
            }
        }
    }

}
